Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cdce8p
left a comment
There was a problem hiding this comment.
Thanks for the PR! I think codespell would be a great addition. Little bit surprised that it didn't find any spelling issues in the changelog though 😄
| ''' | ||
|
|
||
| [tool.codespell] | ||
| ignore-words-list = "ans,ccompiler,corus,fo,froms,haa,hax,notin,ot,statics,whet,zar" |
There was a problem hiding this comment.
2.3.0 added inline ignores. We should probably use those for single occurrences like froms.
# codespell:ignore fromsThere was a problem hiding this comment.
This sounds way too chatty to me. Putting all the config in one place sounds more intuitive and sensible to me.
|
|
||
| [tool.codespell] | ||
| ignore-words-list = "ans,ccompiler,corus,fo,froms,haa,hax,notin,ot,statics,whet,zar" | ||
| skip = "./mypyc/external/*,*.pyi,*.test" |
There was a problem hiding this comment.
I do wonder if we should just skip the whole mypy/test/ and mypyc/test folders entirely.
Personally I'd also just move the config to .pre-commit-config.yaml directly. Don't think any one is ever running codespell outside pre-commit.
This also allows us to use the pre-commit files filter as well with exclude_types: [pyi, test] and exclude: ^(mypyc/external/|mypy/test|mypyc/test).
There was a problem hiding this comment.
Ignoring typos in all tests sounds a bit lazy. I detest those cryptic regex syntaxes and have struggled to make them work when configuring both mypy and black. I much prefer the config of pytest and ruff which do intuitive filtering without ^(|) which might be great for computers to parse but is suboptimal for those of us that do not have a masters degree in computer science.
The point of PEP621 is to concentrate the project config into a canonical file. Some users may choose to run codespell on the command line and it would be a shame if they did so without access to the config that was stored in a hidden file.
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
|
More new typos to fix… |
|
This has been implemented in Thanks @cclauss for starting the discussion here! |
Replaces python#18387 Use codespell in pre-commit to detect spelling mistakes, see python#18642. Ignore test and typeshed folders.
Replaces python#18387 Use codespell in pre-commit to detect spelling mistakes, see python#18642. Ignore test and typeshed folders.
Replaces python#18387 Use codespell in pre-commit to detect spelling mistakes, see python#18642. Ignore test and typeshed folders.
https://pypi.org/project/codespell